package com.github.gaojh.example;

import com.github.gaojh.example.aop.DemoA;
import com.github.gaojh.ioc.annotation.Autowired;
import com.github.gaojh.ioc.annotation.Setup;
import com.github.gaojh.mvc.route.RouteHandler;
import com.github.gaojh.mvc.route.Routers;
import com.github.gaojh.mvc.setup.SetupAdapter;
import com.github.gaojh.server.http.HttpRequest;

/**
 * @author gaojianhua
 * @date 2019/12/11 3:18 下午
 */
@Setup
public class FlyingSetup implements SetupAdapter {

    @Autowired
    private DemoA demoA;

    @Override
    public void run() {
        System.out.println("hello flying");
        this.demoA.t();
        Routers.me.get("/gaojh", httpRequest -> "OK");
    }
}
